package com.study.factory.bySpring;

import org.springframework.beans.factory.FactoryBean;

public class MyFactoryBean implements FactoryBean {

    private String arg1;

    private String arg2;


    public Object getObject() throws Exception {
        return new DemoC(arg1, arg2);
    }

    public Class<?> getObjectType() {
        return DemoC.class  ;
    }

    public boolean isSingleton() {
        return true;
    }

    public String getArg1() {
        return arg1;
    }

    public void setArg1(String arg1) {
        this.arg1 = arg1;
    }

    public String getArg2() {
        return arg2;
    }

    public void setArg2(String arg2) {
        this.arg2 = arg2;
    }
}
